<template>
  <div class="GivingOrRecycling">
    <el-radio-group v-model="type" @change="active" fill="#7b94d8">
      <el-radio-button label="1">新增审批</el-radio-button>
      <el-radio-button label="2" :disabled="!isDirector"
        >主管审批</el-radio-button
      >
      <el-radio-button label="3" :disabled="!isFinancial"
        >财务审批</el-radio-button
      >
      <el-radio-button label="4">审核结束</el-radio-button>
    </el-radio-group>
    <NewApproval v-if="type == 1"></NewApproval>
    <AuditList v-if="type == 2"></AuditList>
    <FinancialAudit v-if="type == 3"></FinancialAudit>
    <AudiResults v-if="type == 4"></AudiResults>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
import NewApproval from "./components/NewApproval";
import AuditList from "./components/AuditList.vue";
import FinancialAudit from "./components/FinancialAudit";
import AudiResults from "./components/AudiResults";
export default {
  components: { NewApproval, AuditList, FinancialAudit, AudiResults },
  data() {
    return {
      type: "1",
    };
  },
  methods: {
    active() {},
  },
  computed: {
    ...mapGetters(["isDirector", "isFinancial"]),
  },
  mounted() {},
};
</script>

<style lang="less" scoped>
.GivingOrRecycling {
  padding: 20px;
}
</style>